package squares;
import be.kuleuven.cs.som.annotate.Basic;
/**
 * An exception class that is thrown when the given humidity is bigger or smaller than
 * the boundary that was set for the humidity
 * 
 * @version 1
 * @author 	Gilles Groven & Jochen Tombal
 */



public class InvalidHumidityException extends Exception {
	
	/**
	 *  A version number for classes that implement the interface
	 * 	Serializable which is strongly recommends by Java API
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Variable registering the value of the humidity of a square and is expressed
	 * in percent and goes from 0 to 100.
	 */
	public final double humidity;
	/**
	 *  this new InvalidHumidityException with the given value of the humidity 
	 *  
	 * @param humidity
	 * 		The value of this new invalid humidity exception
	 * @post
	 * 		The humidity of this new invalid humidity exception is equal to the given value
	 * 		| new.humidity == humidity
	 * @effect
	 * 		The exception is invoked when the humidity is bigger or smaller than
	 * 		the boundary that was set for the humidity
	 */
	public InvalidHumidityException(double humidity)
	{
		this.humidity = humidity;
	}
	/**
	 * @return The value of the humidity that caused this exception.
	 */
	@Basic
	public double getHumidity()
	{
		return humidity;
	}

}
